package cn.itsource.feign;

import cn.itsource.domain.Store;
import cn.itsource.utils.JsonResult;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class StoreFeignFallbackFactory implements FallbackFactory<StoreFeign> {
    @Override
    public StoreFeign create(Throwable throwable) {
        return new StoreFeign() {
            @Override
            public JsonResult add(Store store) {
                return new JsonResult(false,"正在殴打程序员，请稍后！");
            }
        };
    }
}
